
<div class="layui-input-inline">
    <a class="layui-btn model-a" href="{:url('Carmanage/addcartype')}">添加品牌</a>
    <a class="layui-btn model-a" href="{:url('Carmanage/addcartypes')}">添加型号</a>
</div>

<table class="layui-table" lay-filter="edit-table" lay-data="{method: 'post',loading:'true', url:'{:url('Carmanage/cartype')}', page:true, id:'idDemo'}" lay-filter="test">
    <thead>
    <tr>
        <th lay-data="{field:'cartype_what'}">车辆品牌/型号</th>
        <th lay-data="{toolbar:'#pid'}">类型</th>
        <th lay-data="{toolbar:'#pidname'}">所属品牌</th>
        <th lay-data="{toolbar:'#info',width:180,}">操作</th>
    </tr>
    </thead>
</table>
<script type="text/html" id="pid">
    {{#  if(d.pid == 0){ }}
    品牌
    {{#  } else { }}
    型号
    {{#  } }}
</script>

<script type="text/html" id="pidname">
    {{#  if(d.pid == 0){ }}
    顶级
    {{#  } else { }}
    {{d.pidname}}
    {{#  } }}
</script>

<script type="text/html" id="car_who">
    {{#  if(d.car_who == 1){ }}
    平台车
    {{#  } else if(d.car_who == 2){ }}
    {{d.store_name}}
    {{#  } else if(d.car_who == 3) { }}
    私家车
    {{#  } }}
</script>
<script type="text/html" id="info">
    <a class="layui-btn  layui-btn-xs  edit-table ajax-delete" data-title="删除" data-msg="确认删除？" href="{:url('Carmanage/delcartype')}?cartype_id={{d.cartype_id}}">删除</a>
</script>

